import React, { Component } from 'react'
import { observer, inject } from 'mobx-react'
import {
  View,
  Text,
  Button,
} from 'react-native'

@inject('test2Store')
@observer
export default class test2 extends Component {

  render() {
    console.log('test2 render')
    return (
      <View style={{ justifyContent: 'center', alignItems: 'center', marginTop: 20, }}>
        <Text style={{ marginBottom: 15, fontSize: 16, }}>{this.props.test2Store.time}</Text>
        <Button
          onPress={() => {
            this.props.test2Store.refresh()
          }}
          title={'获取时间'}
        />
      </View>
    )
  }
}